package com.yywq.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yywq.pojo.Orders;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: 吴磊
 * @program: yywq
 * @create: 2021-03-20 22:19
 */
@Repository
public interface OrdersMapper extends BaseMapper<Orders> {

    /**
     * 通过卖家id获取订单
     *
     * @param sid
     * @return
     */
    List<Orders> getOrdersBySid(@Param("sid") String sid);

    /**
     * 通过买家id获取订单
     *
     * @param bid
     * @return
     */
    List<Orders> getOrdersByBid(@Param("bid") String bid);

    /**
     * 插入订单
     *
     * @param orders
     * @return
     */
    int insertOrder(Orders orders);
}
